{% extends "::base.html.twig" %}

{% block meta %}
    <meta name="mtt-blog/config/environment" content="{{ env | raw }}" />
{% endblock %}

{% block stylesheets %}
    {{- assets("/dist/mttblog_main.min.css") }}
{% endblock %}

{% block body %}
    <div id="navbar" class="navbar navbar-inverse">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">
                <img src="/bundles/mttblog/img/logo.png" class="pull-left" />
                <span class="hidden-xs hidden-sm pull-left">Дашборд</span>
            </a>
        </div>
        <div class="visible-xs visible-sm"></div>
        <div class="hidden-xs hidden-sm pull-right">
            <p class="navbar-text">Превед{% if app.user %}, {{ app.user.username }}{% endif %}</p>

            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="{{ path('logout') }}">
                        <i class="glyphicon glyphicon-off"></i> Выход
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="row main-container" id="main-application">
        {% block content %}{% endblock %}
    </div>
{% endblock %}

{% block javascripts %}
    {{- assets("/dist/mttblog.min.js") }}
    <script src="{{ path('fos_js_routing_js', {'callback': 'fos.Router.setData'}) }}"></script>
    <script>
        moment.locale('{{ app.request.locale }}');
    </script>
{% endblock %}
